#include <iostream>
using namespace std;
int* bubble_sort(int* array,int len)
{
	for(int i= 0;i<len;i++)
	{
		for(int j = 0;j<len-i;j++)
		{
			int *p0 = array+j;
			int *p1 = array+j+1;
			if(*(p0)>*(p1))
			{
				int tmp = *p1;
				*p1 = *p0;
				*p0 = tmp;
			}
		}
	}
	return array;
}

int main()
{
	int a[10] = {6,1,4,2,5,8,9,7,0,3};
	int *f = bubble_sort(a,10);
	for(int i = 0;i<10;i++)
	{
		cout<<*(a+i)<<" ";
	}
	return 0;
}
